package cn.thoughtworks.school.repositories;

import cn.thoughtworks.school.entities.UserOrganization;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface UserOrganizationRepository extends JpaRepository<UserOrganization, Long> {

  List<UserOrganization> findByOrganizationIdAndUserIdIn(Long organizationId, List<Long> userIds);

  List<UserOrganization> findByOrganizationId(Long organizationId);

  UserOrganization findByOrganizationIdAndUserId(Long organizationId, Long userId);
}
